<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>我的订单</title>
<link href="${ctxStatic }/xiake/css/list.css" rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="${ctxStatic }/index/css/Personal.css" />
<jsp:include page="/WEB-INF/views/layouts/head.jsp"></jsp:include>
<script src="${ctxStatic }/index/js/Personal.js"></script>
	<script type="text/javascript">
	$(function(){
		
		$("#search").click(function(){
			$("#searchForm").submit();
		})
		$('#daysnum,#ordertype,#status').change(function(){
			$('#searchForm').submit();
		}); 
	})
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
			return false;
		}
	</script>
</head>
<body>
<c:set var="siderMenuName" value="我的订单"/>
		<%@ include file="/WEB-INF/views/modules/base/siderMenu.jsp"%>
	 <div id="tab2" class="tab_content"style="float: right;" >
	 <form id="searchForm" action="${ctxFront}/orders/orderList" method="post">
	 <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
	 <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                <div class="order_for">
                    <div class="member_2" >
                        <dl>
                            <dd >
                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
					<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                <span>订单号：</span>&nbsp;
                                <input type="text" name="orderid" value="${orders.orderid }" placeholder="请输入订单号" class="order"/>
                                <span style="margin-left: 10px;">预定日期：</span>&nbsp;
                                <input type="text" id="createDateQueryStart" name="createDateQueryStart" maxlength="20" readonly class="order_table_s Wdate order"
						value="${orders.createDateQueryStart }" 
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,maxDate:'#F{$dp.$D(\'createDateQueryEnd\')}'});"/>
						 - <input type="text" id="createDateQueryEnd" name="createDateQueryEnd" maxlength="20" readonly class="order_table_s Wdate order"
						value="${orders.createDateQueryEnd }" 
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,minDate:'#F{$dp.$D(\'createDateQueryStart\')}'});"/>
                        <div class="order_table_z pointer inquiry" id="search">查询</div>
                            </dd>
                        </dl>
                    </div><br>
         <table border="0" align="center" class="my-dingdan">

        <tr class="back">
            <td colspan="2" style="padding-left: 35px">订单名称&nbsp;:&nbsp;&nbsp;&nbsp;
                <select name="ordertype" style="min-width:140px;" id="ordertype">
					<option value="">全部类型</option>
					<option value="${ORDER_TYPE_RENTPRODUCT_DAY }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_DAY?'selected':'' }>按天包车</option>
					<option value="${ORDER_TYPE_RENTPRODUCT_TRAVEL }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_TRAVEL?'selected':'' }>旅游包车</option>
					<option value="${ORDER_TYPE_RENTPRODUCT_AIRPLANE }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_AIRPLANE?'selected':'' }>接送飞机</option>
					<option value="${ORDER_TYPE_RENTPRODUCT_CUSTOM }" ${orders.ordertype == ORDER_TYPE_RENTPRODUCT_CUSTOM?'selected':'' }>定制包车</option>
				</select>
            </td>
            <!--<td></td>-->
            <td >行程/有效期</td>
            <td>总金额</td>
            <td>订单状态
				<select name="orderstatus" style="min-width:100px" id="status">
					<option value="">全部</option>
					<option value="${TORDERS_STATUS_NO_PAY }" ${orders.orderstatus == TORDERS_STATUS_NO_PAY?'selected':'' }>未支付</option>
					<option value="${TORDERS_STATUS_PAY }" ${orders.orderstatus == TORDERS_STATUS_PAY?'selected':'' }>已支付</option>
					<option value="${TORDERS_STATUS_BACK }" ${orders.orderstatus == TORDERS_STATUS_BACK?'selected':'' }>已取消</option>
					<option value="${TORDERS_STATUS_CANCEL }" ${orders.orderstatus == TORDERS_STATUS_CANCEL?'selected':'' }>已作废</option>
				</select>
            </td>
            <td>操作</td>
        </tr>
        <c:forEach items="${page.list}" var="orders">
        <tr class="pad">
            <td style="padding-left: 35px">订单号码:：${orders.orderid}</td>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
            <td>订单日期:<fmt:formatDate value="${orders.createDate }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
        </tr>
        <tr>
            <td style="padding-left: 35px" >${orders.ordername }</td>
            <td></td>
            <td align="left"> <fmt:formatDate value="${orders.departdate }" pattern="yyyy-MM-dd HH:mm"/></td>
            <td >￥${orders.dueamount}</td>
            <td align="center">
               <c:if test="${orders.orderstatus == TORDERS_STATUS_PAY}">已支付</c:if>
				<c:if test="${orders.orderstatus == TORDERS_STATUS_NO_PAY}">未支付</c:if>
				<c:if test="${orders.orderstatus == TORDERS_STATUS_BACK}">
					已取消<c:if test="${orders.settlereason == '5'}">（更换车队）</c:if>
				</c:if>
				<c:if test="${orders.orderstatus == TORDERS_STATUS_CANCEL}">已作废</c:if>
            </td>
             <td >
             	<c:if test="${orders.orderstatus == TORDERS_STATUS_NO_PAY}">
				<div class=""><a href="${ctxFront}/pay/payWay?orderid=${orders.orderid}&boardaddrfc=${orders.realscheOff.siteid }&offaddrfc=${orders.realscheBoard.siteid }">支付</a></div>&nbsp;
				<div class=""><a href="${ctxFront}/pay/cancel?orderid=${orders.orderid}">取消订单</a></div>
				</c:if>
				<c:if test="${orders.orderstatus == TORDERS_STATUS_PAY}">
				<c:if test="${orders.ordertype == ORDER_TYPE_REALSCHE_SELF_TRAVEL}">
					<div class=""><a href="${ctxFront}/realsche/backMoney?orderid=${orders.orderid}">退票</a></div>
				</c:if>
				<c:if test="${orders.ordertype ne ORDER_TYPE_REALSCHE_SELF_TRAVEL}">
					<div class=""><a href="${ctxFront}/pay/backMoney?orderid=${orders.orderid}">退票</a></div>
				</c:if>
				</c:if>
				<div class=""><a href="${ctxFront}/orders/orderDetail?orderid=${orders.orderid}" target="_blank">查看</a></div>
             </td>
        </tr>
        <tr class="my-bor">
   			<td colspan="6"></td>
		</tr>
</c:forEach>

    </table></form>
	
</div>
	 	<div style="text-align: center;">
		<div class="pagination  font_normal_size" >${page.html}</div></div>
	</body>
	<jsp:include page="/WEB-INF/views/layouts/foot.jsp"></jsp:include> 
</html>
